]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: avoid an assertion in a new window/deleted workspace race
authorDan Winship <danw@gnome.org>
Wed, 20 Apr 2011 20:04:03 +0000 (16:04 -0400)
committerOwen W. Taylor <otaylor@fishsoup.net>
Mon, 25 Apr 2011 20:44:18 +0000 (16:44 -0400)
If a window appeared on a workspace that was then quickly removed, we
could hit an assertion in mutter. Avoid that.

https://bugzilla.gnome.org/show_bug.cgi?id=648132

js/ui/workspace.js
js/ui/workspaceThumbnail.js

index 3a07585ad93591d6eb2a01281c7638b8e5126344..2d487660ee603b61197256ca96deb9033a40c847 100644 (file)
@@ -1113,7 +1113,9 @@ Workspace.prototype = {
             // the compositor finds out about them...
             Mainloop.idle_add(Lang.bind(this,
                                         function () {
-                                            if (this.actor && metaWin.get_compositor_private())
+                                            if (this.actor &&
+                                                metaWin.get_compositor_private() &&
+                                                metaWin.get_workspace() == this.metaWorkspace)
                                                 this._doAddWindow(metaWin);
                                             return false;
                                         }));
index 96fd52bc5357e06cf643237f12ab723e91c2a830..8c12e86c0cc4df869aa412ac231ab7c1a8d58de3 100644 (file)
@@ -276,7 +276,9 @@ WorkspaceThumbnail.prototype = {
             // the compositor finds out about them...
             Mainloop.idle_add(Lang.bind(this,
                                         function () {
-                                            if (this.actor && metaWin.get_compositor_private())
+                                            if (this.actor &&
+                                                metaWin.get_compositor_private() &&
+                                                metaWin.get_workspace() == this.metaWorkspace)
                                                 this._doAddWindow(metaWin);
                                             return false;
                                         }));